package com.royalone.security.controller;

import com.royalone.security.domain.Blog;
import com.royalone.security.mapper.BlogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api")
public class BlogController {

    @Autowired
    BlogMapper blogMapper;

    @GetMapping("/getAnswerList")
    public List<Blog> getAnswers() {
        return blogMapper.getAll();
    }
}
